package com.sram.dao.impl;

import java.util.List;

import org.springframework.orm.hibernate3.HibernateTemplate;

import com.sram.dao.FunctionDao;
import com.sram.entity.Function;
import com.sram.entity.User;

public  class FunctionDaoImpl implements FunctionDao {
	private HibernateTemplate template;
	public HibernateTemplate getTemplate() {
		return template;
	}
	public void setTemplate(HibernateTemplate template) {
		this.template = template;
	}
	
	public List<Function> findll(String name) {
		try {
			List<Function>  function=template.find("from Function f where f.fName=?", new Object[]{name});
				return function;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
	
}
